(in-package :tartlet)

(defclass/std turtle ()
    ((coords       :std t)
     (angle        :std 0)
     (turtle-color :std 0)
     (pen-down-p   :std t))) ; t - down, nil - up

(defmethod left  ((turtle turtle) (angle number))
    (incf (angle turtle) (d->r angle)))

(defmethod right ((turtle turtle) (angle number))
    (decf (angle turtle) (d->r angle)))

(defun pen-up (turtle)
    (setf (pen-down-p turtle) nil))

(defun pen-down (turtle)
    (setf (pen-down-p turtle) t))
